<!doctype html>
<html>
<head>
    <#include "include/common.header.ftl" >
    <script type="text/javascript" src="/js/coupon.js"></script>
</head>
<body style="margin: 1px">
<table id="dg" title="优惠券" class="easyui-datagrid"
       fitColumns="true" pagination="true" rownumbers="true"
       url="/demo01/couponPage?state=42&limit=10&sort=redeemCode" fit="true" toolbar="#tb">
    <thead>
    <tr>
        <th field="cb" checkbox="true" align="center"></th>
        <th field="redeemCode" width="50" align="center">优惠券编号</th>
        <th field="discountAmount" width="50" align="center" >优惠额度</th>
        <th field="serviceType" width="50" align="center" >优惠类型</th>
        <th field="state" width="50" align="center">满多少使用</th>
        <th field="phoneNumber" width="50" align="center" >持有用户</th>
         <th field="useable" width="50" align="center" >可用</th>
    </tr>
    </thead>
</table>
<div id="tb">
    <div>
       <!-- <a href="javascript:openSaleChanceAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">创建</a>-->
        <a href="javascript:openSaleChanceModifyDialog()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">详情/修改</a>
        <a href="javascript:deleteSaleChance()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
    </div>
    <div>
        &nbsp;优惠券编号：&nbsp;<input type="text" id="s_phoneNumber" size="20" onkeydown="if(event.keyCode==13) searchSaleChance()"/>
        &nbsp;服务类型：&nbsp;<input type="text" id="s_orderNumber" size="20" onkeydown="if(event.keyCode==13) searchSaleChance()"/>
        &nbsp;用户号码：&nbsp;<input type="text" id="s_servicePersonal" size="20" onkeydown="if(event.keyCode==13) searchSaleChance()"/>
      
        <a href="javascript:searchSaleChance()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
    </div>
</div>

<div id="dlg" class="easyui-dialog" style="width:700px;height:450px;padding: 10px 20px"
     closed="true" buttons="#dlg-buttons">
        <input type="text" id="tag" name="tag" value="0"  hidden="true"/>

    <form id="fm" method="post">
        <table cellspacing="8px">
            
            <tr>
                <td>优惠券编号：</td>
                <td><input type="text" class="easyui-tooltip" title="*不能修改"  id="redeemCode" name="redeemCode" class="easyui-validatebox" required="true" /></td>
                <td>优惠额度：</td>
                <td><input type="text" id="discountAmount" name="discountAmount" class="easyui-validatebox "  required="true" /></td>
            </tr>
            <tr>
                <td>服务类型：</td>
                <td><input type="text" id="serviceType" name="serviceType" class="easyui-validatebox" required="true" /></td>
                <td>开始时间：</td>
                <td><input type="text" id="activationTime" name="activationTime" class="easyui-datetimebox" required="true"/></td>
             
                   </tr>
            <tr>
                <td>满多少使用：</td>
                <td><input type="text" id="state" name="state" class="easyui-validatebox" required="true"/></td>
             	<td>手机号：</td>
                <td><input type="text" id="phoneNumber" name="phoneNumber" class="easyui-validatebox" required="true"/></td>
            </tr>
              <tr>
               	<td>结束时间：</td>
                <td><input type="text" id="finallyTime" name="finallyTime" class="easyui-datetimebox" required="true"/></td>
            </tr>
        </table>
    </form>
</div>

<div id="dlg-buttons">
    <a href="javascript:saveSaleChance()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
    <a href="javascript:closeSaleChanceDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
</div>
</body>
</html>